document.getElementById("mySelect").addEventListener("click",function (e) {
    var self=e.target,myId=self.getAttribute("data-id");
    var OActive=this.querySelector(".active");
    var flag=self.classList.contains("active");
    var content=document.getElementById(myId);
    var list=document.querySelector(".rec-list");
    if(flag){
        self.classList.remove("active");
        content.classList.remove("fade");
        setTimeout(function () {
            content.classList.remove("show");
        },50);
        if(list){
            list.classList.remove("selectIng");
        }
    }else {
        if(OActive){
            OActive.setAttribute("class","select-item");
        }
        self.classList.add("active");
        var oc=document.querySelector(".select-content.show.fade");
        if(oc){
            oc.setAttribute("class","select-content");
        }
        content.classList.add("show");
        setTimeout(function () {
            content.classList.add("fade");
        },20);
        if(list){
            list.classList.add("selectIng");
        }
    }
});
document.getElementById("BillNo").addEventListener("click",mychoose);
document.getElementById("time").addEventListener("click",mychoose);
function mychoose(e) {
    var self=e.target,my=this;
    var active=this.getAttribute("data-id");
    var select=document.getElementById(active);
    var list=document.querySelector(".rec-list");
    var text=self.textContent;
    var option=self.parentNode.querySelector(".active");
    if(option){
        option.classList.remove("active");
    }
    self.classList.add("active");
    my.classList.remove("fade");
    setTimeout(function () {
        my.classList.remove("show");
    },50);
    if(list){
        list.classList.remove("selectIng");
    }
    if(select){
        select.textContent=text;
        select.classList.remove("active");
    }
    console.log(e.target)
};
